<template>
    <div class="studentDetail">
        <div class="navContent">
            <div class="backcontent" @click="handleBack">
                <i class="el-icon-back"></i>
                <div>返回</div>
            </div>

            <div class="title">
                学生详情
            </div>
        </div>

        <div class="tabsBox">
            <div class="innerBox">
                <div class="tabsBox_left">
                    <div class="tabsitem" :class="{ tabsitemed: tabsCurrindex == 0 }" @click="handleTabsCurrindex(0)">
                        <div>
                            统计
                        </div>
                        <div v-if="tabsCurrindex == 0" class="heng"></div>
                    </div>
                    <div class="tabsitem" :class="{ tabsitemed: tabsCurrindex == 1 }" @click="handleTabsCurrindex(1)">
                        <div>
                            练习
                        </div>
                        <div v-if="tabsCurrindex == 1" class="heng"></div>
                    </div>
                </div>

                <div class="tabsBox_right">
                    <img src="@/static/image/avatar.jpg" alt="" srcset="">
                    <div class="message">
                        <div>
                            Aimee
                        </div>
                        <div>
                            143***5678
                        </div>
                    </div>

                </div>
            </div>


            <div v-if="tabsCurrindex == 0" class="screen_box">

                <div class="screen_box_left">
                    <div class="lable">
                        时间筛选：
                    </div>

                    <el-date-picker v-model="value1" type="date" placeholder="选择日期">
                    </el-date-picker>
                </div>
                <div class="btn">
                    查询
                </div>
            </div>

        </div>

        <!-- 统计 -->
        <div v-if="tabsCurrindex == 0">
            <studentStatistics></studentStatistics>
        </div>


        <!-- 练习 -->
        <div v-if="tabsCurrindex == 1">
            <practice></practice>
        </div>


    </div>
</template>

<script>
import studentStatistics from "./studentStatistics.vue"
import practice from "./practice.vue"
export default {
    components: {
        studentStatistics,
        practice
    },
    data() {
        return {
            tabsCurrindex: 0,
            value1: "",
        }
    },
    methods: {
        handleTabsCurrindex(index) {
            this.tabsCurrindex = index
        },
        handleBack() {
            this.$router.go(-1)
        },
    }
}

</script>

<style lang="scss" scoped>
.studentDetail {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;

    .navContent {
        display: flex;
        align-items: center;
        font-family: Alibaba PuHuiTi, Alibaba PuHuiTi;
        font-weight: 400;
        font-size: 14px;
        color: #777777;
        line-height: 16px;

        .backcontent {
            display: flex;
            align-items: center;
            cursor: pointer;

        }

        .title {
            margin-left: 30px;
        }
    }

    .tabsBox {
        width: 100%;
        // height: 72px;
        background: #FFFFFF;
        border-radius: 4px 4px 4px 4px;
        margin-top: 16px;
        padding: 16px;
        box-sizing: border-box;

        .innerBox {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;

            .tabsBox_left {
                display: flex;

                .tabsitem {
                    font-family: PingFang SC, PingFang SC;
                    font-weight: 400;
                    font-size: 16px;
                    color: #535D6D;
                    line-height: 19px;
                    margin-right: 28px;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    cursor: pointer;

                    .heng {
                        width: 24px;
                        height: 2px;
                        background: #4BA840;
                        border-radius: 8px 8px 8px 8px;
                        margin-top: 10px;
                    }
                }

                .tabsitemed {
                    font-weight: 550;
                    font-size: 16px;
                    color: #4BA840;
                }
            }

            .tabsBox_right {
                display: flex;
                align-items: center;

                img {
                    width: 40px;
                    height: 40px;
                    border-radius: 40px;
                }

                .message {
                    font-family: PingFang SC, PingFang SC;
                    font-weight: 400;
                    font-size: 12px;
                    color: #333333;
                    line-height: 20px;
                    margin-left: 8px;
                }
            }

        }


        .screen_box {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 36px;

            .screen_box_left {
                display: flex;
                align-items: center;

                .lable {
                    font-family: PingFang SC, PingFang SC;
                    font-weight: 400;
                    font-size: 12px;
                    color: #777777;
                    line-height: 14px;
                }
            }

            .btn {
                width: 74px;
                height: 34px;
                background: #4BA840;
                border-radius: 4px 4px 4px 4px;
                font-family: PingFang SC, PingFang SC;
                font-weight: 500;
                font-size: 14px;
                color: #FFFFFF;
                line-height: 34px;
                text-align: center;
                cursor: pointer;
            }
        }

    }

}

::v-deep .el-input__inner:active {
    border: 1px solid #4BA840;
}

::v-deep .el-input__inner:focus {
    border: 1px solid #4BA840;
}

::v-deep .el-select .el-input.is-focus .el-input__inner {
    border: 1px solid #4BA840;
}

::v-deep .el-input .el-input__inner {
    width: 179px;
    height: 35px !important;
    border-radius: 4px 4px 4px 4px;
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    font-size: 12px;
    // line-height: 14px;
}

::v-deep .el-date-table td.today span {
    color: #4BA840 !important;
}

::v-deep .el-date-table td.current:not(.disabled) span {
    background-color: #4BA840 !important;
}
</style>
